<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>扩展运算符的应用</title>
  </head>
  <body>
    <div></div>
    <div></div>
    <div></div>

    <script>
      // 1. 数组的合并
      const kz = ["王太利", "小样"];
      const fh = ["增益", "绫华"];
      const zh = [...kz, ...fh];
      //   console.log(zh);

      // 2. 数组的克隆
      const cl = [...fh];
      //   fh.pop();
      //   console.log(cl, fh);

      // 3. 将伪数组转为真正的数组
      const divs = document.querySelectorAll("div");
      console.log([...divs]);
    </script>
  </body>
</html>
